<% if Vish::Application.config.twitter %>

  <a href="https://twitter.com/share" class="twitter-share-button" data-lang="en" data-url=<%= url %> data-counturl=<%= counturl %> data-text='<%=t("sharing.twitter.message", {:url => url})%>'>Tweet</a>

  <script>
    !function(){
      if(!document.getElementById("twitter-wjs")){
        var twitter_js = document.createElement("script");
        twitter_js.id = "twitter-wjs";
        twitter_js.src = "https://platform.twitter.com/widgets.js";
        var head =document.getElementsByTagName("script")[0];
        head.appendChild(twitter_js);
      }
    }();
  </script>

<% end %>
